<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title>网页视频播放器DEMO</title>
		<link rel="shortcut icon" href="/favicon.ico">
		<style type="text/css">
			body {
				margin: 0px;
				padding: 20px;
				margin-top: 0px;
				font-size: 12px;
				color: #313131;
			}

			div,
			ul,
			li,
			ol,
			dl,
			dt,
			dd,
			form,
			img,
			p {
				margin: 0;
				padding: 0;
				border: 0;
			}

			li {
				list-style-type: none;
			}

			h2,
			h4,
			h5 {
				margin: 0;
				padding: 0;
				font-size: 14px;
			}

			div.help {
				line-height: 26px;
				font-size: 14px;
			}

			#otherPlayer,
			#CuPlayer {
				display: none;
			}
		</style>
		<link href="css/video-js.min.css" rel="stylesheet">
		<script src="js/video.min.js"></script>
		<script src="https://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
	</head>

	<body>
		<div id="otherPlayer">
			<video id="really-cool-video" class="video-js vjs-default-skin" controls preload="auto" width="600"
				height="410" poster="http://video-js.zencoder.com/oceans-clip.png" data-setup='{}'>
				<source src="test.mp4" type="video/ogg" />
				<source src="test.mp4" type="video/mp4" />
				<source src="test.mp4" type="video/webm" />
				<p class="vjs-no-js">
					您的浏览器不支持HTML5播放器
				</p>
			</video>
		</div>

		<script type="text/javascript" src="images/swfobject.js"></script>
		<div class="video" id="CuPlayer">
			<strong>提示：您的Flash Player版本过低，请升级</a>！</strong>
		</div>

		<script type="text/javascript">
			//判断是否为IE浏览器，如果是则使用flash播放器
			if (!!window.ActiveXObject || "ActiveXObject" in window) {
				$('#otherPlayer').remove();
				$('#CuPlayer').show();

				var so = new SWFObject("CuPlayerMiniV4.swf", "CuPlayerV4", "600", "410", "9", "#000000");
				so.addParam("allowfullscreen", "true");
				so.addParam("allowscriptaccess", "always");
				so.addParam("wmode", "opaque");
				so.addParam("quality", "high");
				so.addParam("salign", "lt");
				so.addVariable("CuPlayerSetFile", "CuPlayerSetFile.xml"); //播放器配置文件地址,例SetFile.xml、SetFile.asp、SetFile.php、SetFile.aspx
				so.addVariable("CuPlayerWidth", "600");
				so.addVariable("CuPlayerHeight", "410");
				so.addVariable("CuPlayerAutoPlay", "yes");
				so.addVariable("CuPlayerImage", "images/start.jpg");
				so.addVariable("CuPlayerLogo", "images/logo.png");
				so.addVariable("CuPlayerPosition", "bottom-right");
				so.addVariable("CuPlayerFile", "test.mp4");
				so.write("CuPlayer");
			} else {
				$('#CuPlayer').remove();
				$('#otherPlayer').show();
			}
		</script>
	</body>
</html>


DELIMITER $$

USE `sanfang_api`$$

DROP FUNCTION IF EXISTS `delHtmlTags`$$

CREATE DEFINER=`bydadmin`@`%` FUNCTION `delHtmlTags`( Dirty TEXT(0) ) RETURNS TEXT CHARSET utf8
    DETERMINISTIC
BEGIN
    
	    DECLARE iStart, iEnd, iLength INT;
	    WHILE LOCATE( '<', Dirty ) > 0 AND LOCATE( '>', Dirty, LOCATE( '<', Dirty )) > 0 DO
	      BEGIN
		SET iStart = LOCATE( '<', Dirty ), iEnd = LOCATE( '>', Dirty, LOCATE('<', Dirty ));
		SET iLength = ( iEnd - iStart) + 1;
		IF iLength > 0 THEN
		  BEGIN
		    SET Dirty = INSERT( Dirty, iStart, iLength, '');
		  END;
		END IF;
	      END;
	    END WHILE;
	    RETURN Dirty;
    END$$

DELIMITER ;